package middle;

public class huace {
    public static void main(String[] args) {

    }
    // 待实现函数，在此函数中填入答题代码  计算面积
    private static long getMinArea(int stopPoint, int[][] operations) {


        int result=0;
        int m=operations.length;
        int n=operations[0].length;
        int preX=0;
        int curY=0;
        for(int i=0;i<m;i++){

            result+=Math.abs(operations[i][0]-preX)*curY;
            preX=operations[i][0];
            curY+=operations[i][1];

        }
        result+=Math.abs(stopPoint-preX)*curY;
        return result;
    }

}
